bitkeeper revision 1.1327.1.19 (427664a4ddicjiXeRHKCKKrSnBvjug)
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Mon, 2 May 2005 17:34:28 +0000 (17:34 +0000)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Mon, 2 May 2005 17:34:28 +0000 (17:34 +0000)
Last round of cleanup (for now)

13 files changed:
.rootkeys
xen/arch/ia64/Makefile
xen/arch/ia64/patch/linux-2.6.11/page.h
xen/arch/ia64/patch/linux-2.6.11/pgalloc.h
xen/arch/ia64/patch/linux-2.6.11/setup.c
xen/arch/ia64/patch/linux-2.6.11/swiotlb.c [deleted file]
xen/arch/ia64/patch/linux-2.6.11/system.h
xen/arch/ia64/patch/linux-2.6.11/time.c
xen/arch/ia64/patch/linux-2.6.11/tlb.c
xen/arch/ia64/tools/mkbuildtree
xen/arch/ia64/xenmisc.c
xen/arch/ia64/xensetup.c
xen/include/asm-ia64/config.h

index f24cbca0eda5c7cdc37587f5b4ecf77b288f9862..c6b829b733e755254933e4c4161a24469660ed5c 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
 425ae516EWaNOBEnc1xnphTbRmNZsw xen/arch/ia64/patch/linux-2.6.11/processor.h
 425ae516LecDyXlwh3NLBtHZKXmMcA xen/arch/ia64/patch/linux-2.6.11/series
 425ae516RFiPn2CGkpJ21LM-1lJcQg xen/arch/ia64/patch/linux-2.6.11/setup.c
-425ae516FX_10YaKGMU8Ysf7kkdm_A xen/arch/ia64/patch/linux-2.6.11/swiotlb.c
 425ae516p4ICTkjqNYEfYFxqULj4dw xen/arch/ia64/patch/linux-2.6.11/system.h
 425ae516juUB257qrwUdsL9AsswrqQ xen/arch/ia64/patch/linux-2.6.11/time.c
 425ae5167zQn7zYcgKtDUDX2v-e8mw xen/arch/ia64/patch/linux-2.6.11/tlb.c
index 85d817079a0fe0feeb8dc818a5f709df79691799..36d7b845b38fe498f0e0dbeaf3a6840f1c433cd7 100644 (file)
@@ -7,7 +7,7 @@ OBJS = xensetup.o setup.o time.o irq.o ia64_ksyms.o process.o smp.o \
        machvec.o dom0_ops.o domain.o \
        idle0_task.o pal.o hpsim.o efi.o efi_stub.o ivt.o mm_contig.o \
        xenmem.o sal.o cmdline.o mm_init.o tlb.o smpboot.o \
-       extable.o linuxextable.o xenirq.o \
+       extable.o linuxextable.o xenirq.o xentime.o \
        regionreg.o entry.o unaligned.o privop.o vcpu.o \
        irq_ia64.o irq_lsapic.o vhpt.o xenasm.o dom_fw.o
 # perfmon.o
index 67016a53662b5521e5aaa818b0ec82cf0b0f4c23..cd6b28122459e8b409b58b7e5c42118a7485a596 100644 (file)
@@ -1,52 +1,34 @@
- page.h |   42 +++++++++++++++++++++++++++++++++++++++---
- 1 files changed, 39 insertions(+), 3 deletions(-)
-
-Index: linux-2.6.11-xendiffs/include/asm-ia64/page.h
-===================================================================
---- linux-2.6.11-xendiffs.orig/include/asm-ia64/page.h 2005-04-06 22:58:07.597539393 -0500
-+++ linux-2.6.11-xendiffs/include/asm-ia64/page.h      2005-04-06 23:06:15.908576975 -0500
-@@ -12,6 +12,9 @@
- #include <asm/intrinsics.h>
- #include <asm/types.h>
-+#ifndef __ASSEMBLY__
-+#include <asm/flushtlb.h>
-+#endif
- /*
-  * PAGE_SHIFT determines the actual kernel page size.
-  */
-@@ -95,9 +98,11 @@ extern int ia64_pfn_valid (unsigned long
+--- ../../linux-2.6.11/include/asm-ia64/page.h 2005-03-02 00:37:48.000000000 -0700
++++ include/asm-ia64/page.h    2005-05-02 11:25:33.000000000 -0600
+@@ -95,9 +95,15 @@
  #endif
  
  #ifndef CONFIG_DISCONTIGMEM
 +#ifdef XEN
-+#define pfn_valid(pfn)                (0)
++# define pfn_valid(pfn)               (0)
++# define page_to_pfn(_page)   ((unsigned long)((_page) - frame_table))
++# define pfn_to_page(_pfn)    (frame_table + (_pfn))
 +#else
  # define pfn_valid(pfn)               (((pfn) < max_mapnr) && ia64_pfn_valid(pfn))
--# define page_to_pfn(page)    ((unsigned long) (page - mem_map))
--# define pfn_to_page(pfn)     (mem_map + (pfn))
+ # define page_to_pfn(page)    ((unsigned long) (page - mem_map))
+ # define pfn_to_page(pfn)     (mem_map + (pfn))
 +#endif
  #else
  extern struct page *vmem_map;
  extern unsigned long max_low_pfn;
-@@ -106,9 +111,15 @@ extern unsigned long max_low_pfn;
- # define pfn_to_page(pfn)     (vmem_map + (pfn))
- #endif
--#define page_to_phys(page)    (page_to_pfn(page) << PAGE_SHIFT)
-+#define page_to_pfn(_page)    ((unsigned long)((_page) - frame_table))
-+#define page_to_virt(_page)   phys_to_virt(page_to_phys(_page))
-+
-+#define page_to_phys(_page)   (page_to_pfn(_page) << PAGE_SHIFT)
+@@ -109,6 +115,11 @@
+ #define page_to_phys(page)    (page_to_pfn(page) << PAGE_SHIFT)
  #define virt_to_page(kaddr)   pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
  
-+#define pfn_to_page(_pfn)     (frame_table + (_pfn))
++#ifdef XEN
++#define page_to_virt(_page)   phys_to_virt(page_to_phys(_page))
 +#define phys_to_page(kaddr)   pfn_to_page(((kaddr) >> PAGE_SHIFT))
++#endif
 +
  typedef union ia64_va {
        struct {
                unsigned long off : 61;         /* intra-region offset */
-@@ -124,8 +135,25 @@ typedef union ia64_va {
+@@ -124,8 +135,23 @@
   * expressed in this way to ensure they result in a single "dep"
   * instruction.
   */
@@ -63,8 +45,6 @@ Index: linux-2.6.11-xendiffs/include/asm-ia64/page.h
 +// xen/drivers/console.c uses __va in a declaration (should be fixed!)
 +#define __pa(x)               ({xen_va _v; _v.l = (long) (x); _v.f.reg = 0; _v.l;})
 +#define __va(x)               ({xen_va _v; _v.l = (long) (x); _v.f.reg = -1; _v.p;})
-+//# define __pa(x)    ((unsigned long)(((unsigned long)x) - PAGE_OFFSET))
-+//# define __va(x)    ((void *)((char *)(x) + PAGE_OFFSET))
 +#else
  #define __pa(x)               ({ia64_va _v; _v.l = (long) (x); _v.f.reg = 0; _v.l;})
  #define __va(x)               ({ia64_va _v; _v.l = (long) (x); _v.f.reg = -1; _v.p;})
@@ -72,7 +52,7 @@ Index: linux-2.6.11-xendiffs/include/asm-ia64/page.h
  
  #define REGION_NUMBER(x)      ({ia64_va _v; _v.l = (long) (x); _v.f.reg;})
  #define REGION_OFFSET(x)      ({ia64_va _v; _v.l = (long) (x); _v.f.off;})
-@@ -197,11 +225,19 @@ get_order (unsigned long size)
+@@ -197,7 +223,11 @@
  # define __pgprot(x)  (x)
  #endif /* !STRICT_MM_TYPECHECKS */
  
@@ -84,11 +64,3 @@ Index: linux-2.6.11-xendiffs/include/asm-ia64/page.h
  
  #define VM_DATA_DEFAULT_FLAGS         (VM_READ | VM_WRITE |                                   \
                                         VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC |                \
-                                        (((current->personality & READ_IMPLIES_EXEC) != 0)     \
-                                         ? VM_EXEC : 0))
-+#ifdef XEN
-+#define __flush_tlb() do {} while(0);
-+#endif
-+
- #endif /* _ASM_IA64_PAGE_H */
index 17df69771f995f1914ac87222a5318f4eaedc7a6..be8e0bdd42a52a8986cdfa4b0e6354e29baa724b 100644 (file)
@@ -1,78 +1,72 @@
- pgalloc.h |   17 +++++++++++------
- 1 files changed, 11 insertions(+), 6 deletions(-)
-
-Index: linux-2.6.11-xendiffs/include/asm-ia64/pgalloc.h
-===================================================================
---- linux-2.6.11-xendiffs.orig/include/asm-ia64/pgalloc.h      2005-04-08 11:57:30.909774800 -0500
-+++ linux-2.6.11-xendiffs/include/asm-ia64/pgalloc.h   2005-04-08 11:58:08.102711219 -0500
-@@ -18,6 +18,7 @@
- #include <linux/compiler.h>
- #include <linux/mm.h>
- #include <linux/page-flags.h>
-+#include <linux/preempt.h>
- #include <linux/threads.h>
- #include <asm/mmu_context.h>
-@@ -34,6 +35,10 @@
- #define pmd_quicklist         (local_cpu_data->pmd_quick)
- #define pgtable_cache_size    (local_cpu_data->pgtable_cache_sz)
-+/* FIXME: Later 3 level page table should be over, to create 
-+ * new interface upon xen memory allocator. To simplify first
-+ * effort moving to xen allocator, use xenheap pages temporarily. 
-+ */
- static inline pgd_t*
- pgd_alloc_one_fast (struct mm_struct *mm)
- {
-@@ -61,7 +66,7 @@ pgd_alloc (struct mm_struct *mm)
+--- ../../linux-2.6.11/include/asm-ia64/pgalloc.h      2005-03-02 00:37:31.000000000 -0700
++++ include/asm-ia64/pgalloc.h 2005-04-29 17:09:20.000000000 -0600
+@@ -61,7 +61,11 @@
        pgd_t *pgd = pgd_alloc_one_fast(mm);
  
        if (unlikely(pgd == NULL)) {
--              pgd = (pgd_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO);
++#ifdef XEN
 +              pgd = (pgd_t *)alloc_xenheap_page();
++#else
+               pgd = (pgd_t *)__get_free_page(GFP_KERNEL|__GFP_ZERO);
++#endif
        }
        return pgd;
  }
-@@ -104,7 +109,7 @@ pmd_alloc_one_fast (struct mm_struct *mm
+@@ -104,7 +108,11 @@
  static inline pmd_t*
  pmd_alloc_one (struct mm_struct *mm, unsigned long addr)
  {
--      pmd_t *pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
++#ifdef XEN
 +      pmd_t *pmd = (pmd_t *)alloc_xenheap_page();
++#else
+       pmd_t *pmd = (pmd_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
++#endif
  
        return pmd;
  }
-@@ -136,7 +141,7 @@ pmd_populate_kernel (struct mm_struct *m
+@@ -136,7 +144,11 @@
  static inline struct page *
  pte_alloc_one (struct mm_struct *mm, unsigned long addr)
  {
--      struct page *pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
++#ifdef XEN
 +      struct page *pte = alloc_xenheap_page();
++#else
+       struct page *pte = alloc_pages(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO, 0);
++#endif
  
        return pte;
  }
-@@ -144,7 +149,7 @@ pte_alloc_one (struct mm_struct *mm, uns
+@@ -144,7 +156,11 @@
  static inline pte_t *
  pte_alloc_one_kernel (struct mm_struct *mm, unsigned long addr)
  {
--      pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
++#ifdef XEN
 +      pte_t *pte = (pte_t *)alloc_xenheap_page();
++#else
+       pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
++#endif
  
        return pte;
  }
-@@ -152,13 +157,13 @@ pte_alloc_one_kernel (struct mm_struct *
+@@ -152,13 +168,21 @@
  static inline void
  pte_free (struct page *pte)
  {
--      __free_page(pte);
++#ifdef XEN
 +      free_xenheap_page(pte);
++#else
+       __free_page(pte);
++#endif
  }
  
  static inline void
  pte_free_kernel (pte_t *pte)
  {
--      free_page((unsigned long) pte);
++#ifdef XEN
 +      free_xenheap_page((unsigned long) pte);
++#else
+       free_page((unsigned long) pte);
++#endif
  }
  
  #define __pte_free_tlb(tlb, pte)      tlb_remove_page((tlb), (pte))
index 2b95625f9016a9674f08caf4d664ad3fd73fed69..5d7afce32689a48a3212c82696436562bf24c54e 100644 (file)
- setup.c |   72 +++++++++++++++++++++++++++++++++++++++++++++++++++-------------
- 1 files changed, 58 insertions(+), 14 deletions(-)
-
-Index: linux-2.6.11-xendiffs/arch/ia64/kernel/setup.c
-===================================================================
---- linux-2.6.11-xendiffs.orig/arch/ia64/kernel/setup.c        2005-04-07 17:44:13.294980153 -0500
-+++ linux-2.6.11-xendiffs/arch/ia64/kernel/setup.c     2005-04-07 17:46:37.157717072 -0500
-@@ -21,6 +21,9 @@
- #include <linux/init.h>
- #include <linux/acpi.h>
-+#ifdef XEN
-+#include <xen/sched.h>
-+#endif
- #include <linux/bootmem.h>
- #include <linux/console.h>
- #include <linux/delay.h>
-@@ -30,13 +33,17 @@
- #include <linux/seq_file.h>
- #include <linux/string.h>
- #include <linux/threads.h>
-+#ifndef XEN
- #include <linux/tty.h>
- #include <linux/serial.h>
- #include <linux/serial_core.h>
-+#endif
- #include <linux/efi.h>
- #include <linux/initrd.h>
+--- ../../linux-2.6.11/arch/ia64/kernel/setup.c        2005-03-02 00:37:49.000000000 -0700
++++ arch/ia64/setup.c  2005-05-02 10:04:03.000000000 -0600
+@@ -127,7 +127,16 @@
+               range_end   = min(end, rsvd_region[i].start);
  
-+#ifndef XEN
- #include <asm/ia32.h>
-+#endif
- #include <asm/machvec.h>
- #include <asm/mca.h>
- #include <asm/meminit.h>
-@@ -51,6 +58,12 @@
- #include <asm/smp.h>
- #include <asm/system.h>
- #include <asm/unistd.h>
+               if (range_start < range_end)
 +#ifdef XEN
-+#include <linux/mm.h>
-+#include <asm/mmu_context.h>
-+extern unsigned long loops_per_jiffy;         // from linux/init/main.c
-+char saved_command_line[COMMAND_LINE_SIZE];   // from linux/init/main.c
-+#endif
- #if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
- # error "struct cpuinfo_ia64 too big!"
-@@ -66,7 +79,9 @@ DEFINE_PER_CPU(unsigned long, local_per_
- DEFINE_PER_CPU(unsigned long, ia64_phys_stacked_size_p8);
- unsigned long ia64_cycles_per_usec;
- struct ia64_boot_param *ia64_boot_param;
-+#ifndef XEN
- struct screen_info screen_info;
-+#endif
- unsigned long ia64_max_cacheline_size;
- unsigned long ia64_iobase;    /* virtual address for I/O accesses */
-@@ -95,7 +110,6 @@ EXPORT_SYMBOL(ia64_max_iommu_merge_mask)
- struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1];
- int num_rsvd_regions;
--
- /*
-  * Filter incoming memory segments based on the primitive map created from the boot
-  * parameters. Segments contained in the map are removed from the memory ranges. A
-@@ -125,9 +139,12 @@ filter_rsvd_memory (unsigned long start,
-       for (i = 0; i < num_rsvd_regions; ++i) {
-               range_start = max(start, prev_start);
-               range_end   = min(end, rsvd_region[i].start);
--
--              if (range_start < range_end)
--                      call_pernode_memory(__pa(range_start), range_end - range_start, func);
++              {
 +              /* init_boot_pages requires "ps, pe" */
-+              if (range_start < range_end) {
 +                      printk("Init boot pages: 0x%lx -> 0x%lx.\n",
 +                              __pa(range_start), __pa(range_end));
 +                      (*func)(__pa(range_start), __pa(range_end), 0);
 +              }
++#else
+                       call_pernode_memory(__pa(range_start), range_end - range_start, func);
++#endif
  
                /* nothing more available in this segment */
                if (range_end == end) return 0;
-@@ -184,17 +201,17 @@ reserve_memory (void)
-                               + strlen(__va(ia64_boot_param->command_line)) + 1);
+@@ -185,7 +194,12 @@
        n++;
  
-+      /* Reserve xen image/bitmap/xen-heap */
        rsvd_region[n].start = (unsigned long) ia64_imva((void *)KERNEL_START);
--      rsvd_region[n].end   = (unsigned long) ia64_imva(_end);
++#ifdef XEN
++      /* Reserve xen image/bitmap/xen-heap */
 +      rsvd_region[n].end   = rsvd_region[n].start + xenheap_size;
++#else
+       rsvd_region[n].end   = (unsigned long) ia64_imva(_end);
++#endif
        n++;
  
--#ifdef CONFIG_BLK_DEV_INITRD
-+      /* This is actually dom0 image */
-       if (ia64_boot_param->initrd_start) {
-               rsvd_region[n].start = (unsigned long)__va(ia64_boot_param->initrd_start);
-               rsvd_region[n].end   = rsvd_region[n].start + ia64_boot_param->initrd_size;
-               n++;
-       }
--#endif
-       /* end of memory marker */
-       rsvd_region[n].start = ~0UL;
-@@ -204,6 +221,16 @@ reserve_memory (void)
-       num_rsvd_regions = n;
-       sort_regions(rsvd_region, num_rsvd_regions);
-+
-+      {
-+              int i;
-+              printk("Reserved regions: \n");
-+              for (i = 0; i < num_rsvd_regions; i++)
-+                      printk("  [%d] -> [0x%lx, 0x%lx]\n",
-+                              i,
-+                              rsvd_region[i].start,
-+                              rsvd_region[i].end);
-+      }
+ #ifdef CONFIG_BLK_DEV_INITRD
+@@ -299,7 +313,11 @@
  }
  
- /**
-@@ -298,18 +325,17 @@ mark_bsp_online (void)
- #endif
- }
-+#ifdef XEN
  void __init
--setup_arch (char **cmdline_p)
++#ifdef XEN
 +early_setup_arch (char **cmdline_p)
++#else
+ setup_arch (char **cmdline_p)
++#endif
  {
        unw_init();
  
--      ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist);
--
+@@ -308,8 +326,14 @@
        *cmdline_p = __va(ia64_boot_param->command_line);
        strlcpy(saved_command_line, *cmdline_p, COMMAND_LINE_SIZE);
-+      cmdline_parse(*cmdline_p);
  
++#ifdef XEN
++      cmdline_parse(*cmdline_p);
++#undef CONFIG_ACPI_BOOT
++#endif
        efi_init();
--      io_port_init();
++#ifndef XEN
+       io_port_init();
++#endif
  
  #ifdef CONFIG_IA64_GENERIC
        {
-@@ -339,6 +365,10 @@ setup_arch (char **cmdline_p)
-       if (early_console_setup(*cmdline_p) == 0)
-               mark_bsp_online();
-+#ifdef XEN
-+#undef CONFIG_ACPI_BOOT
-+#endif
-+
- #ifdef CONFIG_ACPI_BOOT
-       /* Initialize the ACPI boot-time table parser */
-       acpi_table_init();
-@@ -350,9 +380,13 @@ setup_arch (char **cmdline_p)
-       smp_build_cpu_map();    /* happens, e.g., with the Ski simulator */
+@@ -351,8 +375,17 @@
  # endif
  #endif /* CONFIG_APCI_BOOT */
++#ifndef XEN
+       find_memory();
++#else
 +      io_port_init();
 +}
-+#endif
  
--      find_memory();
--
 +void __init
-+setup_arch (void)
++late_setup_arch (char **cmdline_p)
 +{
++#undef CONFIG_ACPI_BOOT
++#endif
        /* process SAL system table: */
        ia64_sal_init(efi.sal_systab);
  
-@@ -388,7 +422,6 @@ setup_arch (char **cmdline_p)
-       if (!strstr(saved_command_line, "nomca"))
-               ia64_mca_init();
--      platform_setup(cmdline_p);
-       paging_init();
+@@ -492,12 +525,14 @@
+ {
  }
  
-@@ -448,6 +481,9 @@ show_cpuinfo (struct seq_file *m, void *
-               sprintf(cp, " 0x%lx", mask);
-       }
-+#ifdef XEN
-+#define seq_printf(a,b...) printf(b)
++#ifndef XEN
+ struct seq_operations cpuinfo_op = {
+       .start =        c_start,
+       .next =         c_next,
+       .stop =         c_stop,
+       .show =         show_cpuinfo
+ };
 +#endif
-       seq_printf(m,
-                  "processor  : %d\n"
-                  "vendor     : %s\n"
-@@ -659,11 +695,17 @@ cpu_init (void)
+ void
+ identify_cpu (struct cpuinfo_ia64 *c)
+@@ -659,7 +694,11 @@
                                        | IA64_DCR_DA | IA64_DCR_DD | IA64_DCR_LC));
        atomic_inc(&init_mm.mm_count);
        current->active_mm = &init_mm;
@@ -197,18 +102,3 @@ Index: linux-2.6.11-xendiffs/arch/ia64/kernel/setup.c
                BUG();
  
        ia64_mmu_init(ia64_imva(cpu_data));
-+#ifndef XEN
-       ia64_mca_cpu_init(ia64_imva(cpu_data));
-+#endif
- #ifdef CONFIG_IA32_SUPPORT
-       ia32_cpu_init();
-@@ -711,6 +753,8 @@ cpu_init (void)
- void
- check_bugs (void)
- {
-+#ifndef XEN
-       ia64_patch_mckinley_e9((unsigned long) __start___mckinley_e9_bundles,
-                              (unsigned long) __end___mckinley_e9_bundles);
-+#endif
- }
diff --git a/xen/arch/ia64/patch/linux-2.6.11/swiotlb.c b/xen/arch/ia64/patch/linux-2.6.11/swiotlb.c
deleted file mode 100644 (file)
index 77fff5e..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
- swiotlb.c |   21 +++++++++++++--------
- 1 files changed, 13 insertions(+), 8 deletions(-)
-
-Index: linux-2.6.11-xendiffs/arch/ia64/lib/swiotlb.c
-===================================================================
---- linux-2.6.11-xendiffs.orig/arch/ia64/lib/swiotlb.c 2005-04-08 12:13:54.040202667 -0500
-+++ linux-2.6.11-xendiffs/arch/ia64/lib/swiotlb.c      2005-04-08 12:19:09.170367318 -0500
-@@ -124,8 +124,11 @@ swiotlb_init_with_default_size (size_t d
-       /*
-        * Get IO TLB memory from the low pages
-        */
--      io_tlb_start = alloc_bootmem_low_pages(io_tlb_nslabs *
--                                             (1 << IO_TLB_SHIFT));
-+      /* FIXME: Do we really need swiotlb in HV? If all memory trunks
-+       * presented to guest as <4G, are actually <4G in machine range,
-+       * no DMA intevention from HV...
-+       */
-+      io_tlb_start = alloc_xenheap_pages(get_order(io_tlb_nslabs * (1 << IO_TLB_SHIFT)));
-       if (!io_tlb_start)
-               panic("Cannot allocate SWIOTLB buffer");
-       io_tlb_end = io_tlb_start + io_tlb_nslabs * (1 << IO_TLB_SHIFT);
-@@ -135,16 +138,16 @@ swiotlb_init_with_default_size (size_t d
-        * to find contiguous free memory regions of size up to IO_TLB_SEGSIZE
-        * between io_tlb_start and io_tlb_end.
-        */
--      io_tlb_list = alloc_bootmem(io_tlb_nslabs * sizeof(int));
-+      io_tlb_list = alloc_xenheap_pages(get_order(io_tlb_nslabs * sizeof(int)));
-       for (i = 0; i < io_tlb_nslabs; i++)
-               io_tlb_list[i] = IO_TLB_SEGSIZE - OFFSET(i, IO_TLB_SEGSIZE);
-       io_tlb_index = 0;
--      io_tlb_orig_addr = alloc_bootmem(io_tlb_nslabs * sizeof(char *));
-+      io_tlb_orig_addr = alloc_xenheap_pages(get_order(io_tlb_nslabs * sizeof(char *)));
-       /*
-        * Get the overflow emergency buffer
-        */
--      io_tlb_overflow_buffer = alloc_bootmem_low(io_tlb_overflow);
-+      io_tlb_overflow_buffer = alloc_xenheap_pages(get_order(io_tlb_overflow));
-       printk(KERN_INFO "Placing software IO TLB between 0x%lx - 0x%lx\n",
-              virt_to_phys(io_tlb_start), virt_to_phys(io_tlb_end));
- }
-@@ -328,13 +331,13 @@ swiotlb_alloc_coherent(struct device *hw
-        */
-       flags |= GFP_DMA;
--      ret = (void *)__get_free_pages(flags, order);
-+      ret = (void *)alloc_xenheap_pages(get_order(size));
-       if (ret && address_needs_mapping(hwdev, virt_to_phys(ret))) {
-               /*
-                * The allocated memory isn't reachable by the device.
-                * Fall back on swiotlb_map_single().
-                */
--              free_pages((unsigned long) ret, order);
-+              free_xenheap_pages((unsigned long) ret, order);
-               ret = NULL;
-       }
-       if (!ret) {
-@@ -372,7 +375,7 @@ swiotlb_free_coherent(struct device *hwd
- {
-       if (!(vaddr >= (void *)io_tlb_start
-                     && vaddr < (void *)io_tlb_end))
--              free_pages((unsigned long) vaddr, get_order(size));
-+              free_xenheap_pages((unsigned long) vaddr, get_order(size));
-       else
-               /* DMA_TO_DEVICE to avoid memcpy in unmap_single */
-               swiotlb_unmap_single (hwdev, dma_handle, size, DMA_TO_DEVICE);
-@@ -388,8 +391,10 @@ swiotlb_full(struct device *dev, size_t 
-        * When the mapping is small enough return a static buffer to limit
-        * the damage, or panic when the transfer is too big.
-        */
-+#ifndef XEN
-       printk(KERN_ERR "PCI-DMA: Out of SW-IOMMU space for %lu bytes at "
-              "device %s\n", size, dev ? dev->bus_id : "?");
-+#endif
-       if (size > io_tlb_overflow && do_panic) {
-               if (dir == PCI_DMA_FROMDEVICE || dir == PCI_DMA_BIDIRECTIONAL)
index 032c47f80de025c4c7b1e870eb8bb1f15764dca2..e31d332c2bd9a4deca5394a59fbc2ac636a823f4 100644 (file)
@@ -1,16 +1,10 @@
- system.h |   15 +++++++++++++++
- 1 files changed, 15 insertions(+)
-
-Index: linux-2.6.11-xendiffs/include/asm-ia64/system.h
-===================================================================
---- linux-2.6.11-xendiffs.orig/include/asm-ia64/system.h       2005-04-07 10:39:11.066701457 -0500
-+++ linux-2.6.11-xendiffs/include/asm-ia64/system.h    2005-04-07 10:40:19.540544127 -0500
-@@ -24,8 +24,16 @@
+--- ../../linux-2.6.11/include/asm-ia64/system.h       2005-03-02 00:38:07.000000000 -0700
++++ include/asm-ia64/system.h  2005-05-02 10:18:30.000000000 -0600
+@@ -24,8 +24,15 @@
   * 0xa000000000000000+2*PERCPU_PAGE_SIZE
   * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page)
   */
 +#ifdef XEN
-+//#define KERNEL_START                 0xf000000100000000
 +#define KERNEL_START           0xf000000004000000
 +#define PERCPU_ADDR            0xf100000000000000-PERCPU_PAGE_SIZE
 +#define SHAREDINFO_ADDR                0xf100000000000000
@@ -22,7 +16,7 @@ Index: linux-2.6.11-xendiffs/include/asm-ia64/system.h
  
  #ifndef __ASSEMBLY__
  
-@@ -218,9 +226,13 @@ extern void ia64_load_extra (struct task
+@@ -218,9 +225,13 @@
  # define PERFMON_IS_SYSWIDE() (0)
  #endif
  
@@ -36,13 +30,3 @@ Index: linux-2.6.11-xendiffs/include/asm-ia64/system.h
  
  #define __switch_to(prev,next,last) do {                                                       \
        if (IA64_HAS_EXTRA_STATE(prev))                                                          \
-@@ -249,6 +261,9 @@ extern void ia64_load_extra (struct task
- #else
- # define switch_to(prev,next,last)    __switch_to(prev, next, last)
- #endif
-+//#ifdef XEN
-+//#undef switch_to
-+//#endif
- /*
-  * On IA-64, we don't want to hold the runqueue's lock during the low-level context-switch,
index 8df14e4311bce55b4ced1e4fc53052dca18e6908..9e480b969e0e7321f1af66a1afb5adb333ec614d 100644 (file)
 --- ../../linux-2.6.11/arch/ia64/kernel/time.c 2005-03-02 00:37:50.000000000 -0700
-+++ arch/ia64/time.c   2005-04-28 14:29:58.000000000 -0600
-@@ -10,16 +10,22 @@
-  */
- #include <linux/config.h>
-+#ifndef XEN
- #include <linux/cpu.h>
-+#endif
- #include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
-+#ifndef XEN
- #include <linux/profile.h>
-+#endif
- #include <linux/sched.h>
- #include <linux/time.h>
- #include <linux/interrupt.h>
- #include <linux/efi.h>
-+#ifndef XEN
- #include <linux/profile.h>
-+#endif
- #include <linux/timex.h>
- #include <asm/machvec.h>
-@@ -29,10 +35,19 @@
++++ arch/ia64/time.c   2005-05-02 11:19:29.000000000 -0600
+@@ -29,6 +29,9 @@
  #include <asm/sal.h>
  #include <asm/sections.h>
  #include <asm/system.h>
 +#ifdef XEN
-+#include <asm/ia64_int.h>
++#include <linux/jiffies.h>    // not included by xen/sched.h
 +#endif
  
  extern unsigned long wall_jiffies;
  
-+#ifndef XEN
- u64 jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;
-+#else
-+#define INITIAL_JIFFIES 0
-+u64 jiffies_64 = INITIAL_JIFFIES;
-+#define CPU_PROFILING 0
-+#endif
- EXPORT_SYMBOL(jiffies_64);
-@@ -45,33 +60,155 @@
+@@ -45,6 +48,7 @@
  
  #endif
  
-+#ifdef XEN
-+volatile unsigned long last_nsec_offset;
-+extern seqlock_t xtime_lock;
-+unsigned long cpu_khz;  /* Detected as we calibrate the TSC */
-+static s_time_t        stime_irq;       /* System time at last 'time update' */
-+
-+static inline u64 get_time_delta(void)
-+{
-+      return ia64_get_itc();
-+}
-+
-+s_time_t get_s_time(void)
-+{
-+    s_time_t now;
-+    unsigned long flags;
-+
-+    read_lock_irqsave(&xtime_lock, flags);
-+
-+    now = stime_irq + get_time_delta();
-+
-+    /* Ensure that the returned system time is monotonically increasing. */
-+    {
-+        static s_time_t prev_now = 0;
-+        if ( unlikely(now < prev_now) )
-+            now = prev_now;
-+        prev_now = now;
-+    }
-+
-+    read_unlock_irqrestore(&xtime_lock, flags);
-+
-+    return now; 
-+}
-+
-+void update_dom_time(struct exec_domain *ed)
-+{
-+// FIXME: implement this?
-+//    printf("update_dom_time: called, not implemented, skipping\n");
-+      return;
-+}
-+
-+/* Set clock to <secs,usecs> after 00:00:00 UTC, 1 January, 1970. */
-+void do_settime(unsigned long secs, unsigned long usecs, u64 system_time_base)
-+{
-+// FIXME: Should this be do_settimeofday (from linux)???
-+      printf("do_settime: called, not implemented, stopping\n");
-+      dummy();
-+}
-+#endif
-+
-+#if 0 /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-+#endif        /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
-+ 
 +#ifndef XEN
  static struct time_interpolator itc_interpolator = {
        .shift = 16,
        .mask = 0xffffffffffffffffLL,
-       .source = TIME_SOURCE_CPU
- };
-+#endif
-+
-+#ifdef XEN
-+unsigned long domain0_ready = 0;      // FIXME (see below)
-+#define typecheck(a,b)        1
-+/* FROM linux/include/linux/jiffies.h */
-+/*
-+ *    These inlines deal with timer wrapping correctly. You are 
-+ *    strongly encouraged to use them
-+ *    1. Because people otherwise forget
-+ *    2. Because if the timer wrap changes in future you won't have to
-+ *       alter your driver code.
-+ *
-+ * time_after(a,b) returns true if the time a is after time b.
-+ *
-+ * Do this with "<0" and ">=0" to only test the sign of the result. A
-+ * good compiler would generate better code (and a really good compiler
-+ * wouldn't care). Gcc is currently neither.
-+ */
-+#define time_after(a,b)               \
-+      (typecheck(unsigned long, a) && \
-+       typecheck(unsigned long, b) && \
-+       ((long)(b) - (long)(a) < 0))
-+#define time_before(a,b)      time_after(b,a)
-+
-+#define time_after_eq(a,b)    \
-+      (typecheck(unsigned long, a) && \
-+       typecheck(unsigned long, b) && \
-+       ((long)(a) - (long)(b) >= 0))
-+#define time_before_eq(a,b)   time_after_eq(b,a)
-+#endif
- static irqreturn_t
- timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
- {
-       unsigned long new_itm;
-+#ifndef XEN
-       if (unlikely(cpu_is_offline(smp_processor_id()))) {
-               return IRQ_HANDLED;
-       }
-+#endif
-+#ifdef XEN
-+      if (current->domain == dom0) {
-+              // FIXME: there's gotta be a better way of doing this...
-+              // We have to ensure that domain0 is launched before we
-+              // call vcpu_timer_expired on it
-+              //domain0_ready = 1; // moved to xensetup.c
-+              current->vcpu_info->arch.pending_interruption = 1;
-+      }
-+      if (domain0_ready && vcpu_timer_expired(dom0->exec_domain[0])) {
-+              vcpu_pend_timer(dom0->exec_domain[0]);
-+              //vcpu_set_next_timer(dom0->exec_domain[0]);
-+              domain_wake(dom0->exec_domain[0]);
-+      }
-+      if (!is_idle_task(current->domain) && current->domain != dom0) {
-+              if (vcpu_timer_expired(current)) {
-+                      vcpu_pend_timer(current);
-+                      // ensure another timer interrupt happens even if domain doesn't
-+                      vcpu_set_next_timer(current);
-+                      domain_wake(current);
-+              }
-+      }
-+      raise_actimer_softirq();
-+#endif
-+#ifndef XEN
-       platform_timer_interrupt(irq, dev_id, regs);
-+#endif
-       new_itm = local_cpu_data->itm_next;
-       if (!time_after(ia64_get_itc(), new_itm))
-+#ifdef XEN
-+              return;
-+#else
-               printk(KERN_ERR "Oops: timer tick before it's due (itc=%lx,itm=%lx)\n",
-                      ia64_get_itc(), new_itm);
-+#endif
-+#ifdef XEN
-+//    printf("GOT TO HERE!!!!!!!!!!!\n");
-+      //while(1);
-+#else
-       profile_tick(CPU_PROFILING, regs);
-+#endif
-       while (1) {
-+#ifndef XEN
-               update_process_times(user_mode(regs));
-+#endif
-               new_itm += local_cpu_data->itm_delta;
-@@ -82,10 +219,16 @@
-                        * another CPU. We need to avoid to SMP race by acquiring the
-                        * xtime_lock.
-                        */
-+#ifdef TURN_ME_OFF_FOR_NOW_IA64_XEN
-                       write_seqlock(&xtime_lock);
-+#endif
-+#ifdef TURN_ME_OFF_FOR_NOW_IA64_XEN
-                       do_timer(regs);
-+#endif
-                       local_cpu_data->itm_next = new_itm;
-+#ifdef TURN_ME_OFF_FOR_NOW_IA64_XEN
-                       write_sequnlock(&xtime_lock);
-+#endif
-               } else
-                       local_cpu_data->itm_next = new_itm;
-@@ -105,7 +248,12 @@
-                */
-               while (!time_after(new_itm, ia64_get_itc() + local_cpu_data->itm_delta/2))
-                       new_itm += local_cpu_data->itm_delta;
-+//#ifdef XEN
-+//            vcpu_set_next_timer(current);
-+//#else
-+//printf("***** timer_interrupt: Setting itm to %lx\n",new_itm);
-               ia64_set_itm(new_itm);
-+//#endif
-               /* double check, in case we got hit by a (slow) PMI: */
+@@ -110,6 +114,7 @@
        } while (time_after_eq(ia64_get_itc(), new_itm));
        return IRQ_HANDLED;
-@@ -120,6 +268,7 @@
-       int cpu = smp_processor_id();
-       unsigned long shift = 0, delta;
-+printf("ia64_cpu_local_tick: about to call ia64_set_itv\n");
-       /* arrange for the cycle counter to generate a timer interrupt: */
-       ia64_set_itv(IA64_TIMER_VECTOR);
-@@ -133,6 +282,7 @@
-               shift = (2*(cpu - hi) + 1) * delta/hi/2;
-       }
-       local_cpu_data->itm_next = ia64_get_itc() + delta + shift;
-+printf("***** ia64_cpu_local_tick: Setting itm to %lx\n",local_cpu_data->itm_next);
-       ia64_set_itm(local_cpu_data->itm_next);
  }
++#endif
  
-@@ -160,6 +310,7 @@
-        * frequency and then a PAL call to determine the frequency ratio between the ITC
-        * and the base frequency.
-        */
-+
-       status = ia64_sal_freq_base(SAL_FREQ_BASE_PLATFORM,
-                                   &platform_base_freq, &platform_base_drift);
-       if (status != 0) {
-@@ -212,6 +363,7 @@
+ /*
+  * Encapsulate access to the itm structure for SMP.
+@@ -212,6 +217,7 @@
                                        + itc_freq/2)/itc_freq;
  
        if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) {
                itc_interpolator.frequency = local_cpu_data->itc_freq;
                itc_interpolator.drift = itc_drift;
  #ifdef CONFIG_SMP
-@@ -228,6 +380,7 @@
+@@ -228,12 +234,14 @@
                if (!nojitter) itc_interpolator.jitter = 1;
  #endif
                register_time_interpolator(&itc_interpolator);
        }
  
        /* Setup the CPU local timer tick */
-@@ -236,7 +389,9 @@
+       ia64_cpu_local_tick();
+ }
  
++#ifndef XEN
  static struct irqaction timer_irqaction = {
        .handler =      timer_interrupt,
-+#ifndef XEN
        .flags =        SA_INTERRUPT,
-+#endif
-       .name =         "timer"
- };
-@@ -244,12 +399,16 @@
- time_init (void)
- {
-       register_percpu_irq(IA64_TIMER_VECTOR, &timer_irqaction);
-+#ifndef XEN
-       efi_gettimeofday(&xtime);
-+#endif
-       ia64_init_itm();
-+#ifndef XEN
-       /*
-        * Initialize wall_to_monotonic such that adding it to xtime will yield zero, the
-        * tv_nsec field must be normalized (i.e., 0 <= nsec < NSEC_PER_SEC).
+@@ -253,3 +261,4 @@
         */
        set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec);
-+#endif
  }
++#endif
index 4bd3b6cf74959f194122a896b1c2baf803f96e93..1a13908c62e99fc2f1d546884f8e530fa236e755 100644 (file)
@@ -1,21 +1,6 @@
- tlb.c |   10 ++++++++++
- 1 files changed, 10 insertions(+)
-
-Index: linux-2.6.11/arch/ia64/mm/tlb.c
-===================================================================
---- linux-2.6.11.orig/arch/ia64/mm/tlb.c       2005-03-02 01:38:38.000000000 -0600
-+++ linux-2.6.11/arch/ia64/mm/tlb.c    2005-03-19 14:58:43.978400822 -0600
-@@ -21,7 +21,9 @@
- #include <asm/mmu_context.h>
- #include <asm/pgalloc.h>
- #include <asm/pal.h>
-+#ifndef XEN
- #include <asm/tlbflush.h>
-+#endif
- static struct {
-       unsigned long mask;     /* mask of supported purge page-sizes */
-@@ -43,6 +45,9 @@ DEFINE_PER_CPU(u8, ia64_need_tlb_flush);
+--- ../../linux-2.6.11/arch/ia64/mm/tlb.c      2005-03-02 00:38:38.000000000 -0700
++++ arch/ia64/tlb.c    2005-05-02 10:23:09.000000000 -0600
+@@ -43,6 +43,9 @@
  void
  wrap_mmu_context (struct mm_struct *mm)
  {
@@ -25,7 +10,7 @@ Index: linux-2.6.11/arch/ia64/mm/tlb.c
        unsigned long tsk_context, max_ctx = ia64_ctx.max_ctx;
        struct task_struct *tsk;
        int i;
-@@ -83,6 +88,7 @@ wrap_mmu_context (struct mm_struct *mm)
+@@ -83,6 +86,7 @@
                put_cpu();
        }
        local_flush_tlb_all();
@@ -33,7 +18,7 @@ Index: linux-2.6.11/arch/ia64/mm/tlb.c
  }
  
  void
-@@ -132,6 +138,9 @@ EXPORT_SYMBOL(local_flush_tlb_all);
+@@ -132,6 +136,9 @@
  void
  flush_tlb_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
  {
@@ -43,7 +28,7 @@ Index: linux-2.6.11/arch/ia64/mm/tlb.c
        struct mm_struct *mm = vma->vm_mm;
        unsigned long size = end - start;
        unsigned long nbits;
-@@ -163,6 +172,7 @@ flush_tlb_range (struct vm_area_struct *
+@@ -163,6 +170,7 @@
  # endif
  
        ia64_srlz_i();                  /* srlz.i implies srlz.d */
index e4bb793899327bf2d4cdfa49ce72bd3ea96b9fd1..0a60d12faf842f596386351bf72933571e71c60a 100644 (file)
@@ -142,7 +142,7 @@ softlink arch/ia64/lib/strlen_user.S arch/ia64/lib/strlen_user.S
 softlink arch/ia64/lib/strncpy_from_user.S arch/ia64/lib/strncpy_from_user.S
 softlink arch/ia64/lib/strnlen_user.S arch/ia64/lib/strnlen_user.S
 #softlink arch/ia64/lib/swiotlb.c arch/ia64/lib/swiotlb.c
-cp_patch arch/ia64/lib/swiotlb.c arch/ia64/lib/swiotlb.c swiotlb.c
+#cp_patch arch/ia64/lib/swiotlb.c arch/ia64/lib/swiotlb.c swiotlb.c
 softlink arch/ia64/lib/xor.S arch/ia64/lib/xor.S
 
 softlink lib/cmdline.c arch/ia64/cmdline.c
@@ -196,6 +196,8 @@ null include/asm-ia64/desc.h
 null include/asm-ia64/io_apic.h
 null include/asm-ia64/pdb.h
 null include/asm-ia64/module.h
+null include/asm-ia64/ia32.h
+null include/asm-ia64/tlbflush.h
 
 softlink include/asm-ia64/acpi.h include/asm-ia64/acpi.h
 softlink include/asm-ia64/asmmacro.h include/asm-ia64/asmmacro.h
@@ -214,7 +216,7 @@ softlink include/asm-ia64/dma-mapping.h include/asm-ia64/dma-mapping.h
 softlink include/asm-ia64/errno.h include/asm-ia64/errno.h
 softlink include/asm-ia64/fpu.h include/asm-ia64/fpu.h
 softlink include/asm-ia64/hdreg.h include/asm-ia64/hdreg.h
-softlink include/asm-ia64/ia32.h include/asm-ia64/ia32.h
+#softlink include/asm-ia64/ia32.h include/asm-ia64/ia32.h
 softlink include/asm-ia64/ia64regs.h include/asm-ia64/ia64regs.h
 softlink include/asm-ia64/intrinsics.h include/asm-ia64/intrinsics.h
 softlink include/asm-ia64/ioctl.h include/asm-ia64/ioctl.h
@@ -298,14 +300,15 @@ softlink include/linux/percpu.h include/asm-ia64/linux/percpu.h
 softlink include/linux/preempt.h include/asm-ia64/linux/preempt.h
 softlink include/linux/rbtree.h include/asm-ia64/linux/rbtree.h
 softlink include/linux/rwsem.h include/asm-ia64/linux/rwsem.h
-softlink include/linux/seq_file.h include/asm-ia64/linux/seq_file.h
-softlink include/linux/serial_core.h include/asm-ia64/linux/serial_core.h
+#softlink include/linux/seq_file.h include/asm-ia64/linux/seq_file.h
+#softlink include/linux/serial_core.h include/asm-ia64/linux/serial_core.h
 softlink include/linux/stddef.h include/asm-ia64/linux/stddef.h
 softlink include/linux/thread_info.h include/asm-ia64/linux/thread_info.h
 softlink include/linux/threads.h include/asm-ia64/linux/threads.h
 softlink include/linux/timex.h include/asm-ia64/linux/timex.h
 softlink include/linux/topology.h include/asm-ia64/linux/topology.h
 softlink include/linux/seqlock.h include/asm-ia64/linux/seqlock.h
+softlink include/linux/jiffies.h include/asm-ia64/linux/jiffies.h
 
 null include/asm-ia64/linux/file.h
 null include/asm-ia64/linux/module.h
@@ -317,12 +320,15 @@ null include/asm-ia64/linux/profile.h
 null include/asm-ia64/linux/seqlock.h
 null include/asm-ia64/linux/smp_lock.h
 null include/asm-ia64/linux/tty.h
-null include/asm-ia64/linux/jiffies.h
 null include/asm-ia64/linux/kernel_stat.h
 null include/asm-ia64/linux/ptrace.h
 null include/asm-ia64/linux/random.h
 null include/asm-ia64/linux/signal.h
 null include/asm-ia64/linux/bootmem.h
+null include/asm-ia64/linux/serial.h
+null include/asm-ia64/linux/serial_core.h
+null include/asm-ia64/linux/seq_file.h
+null include/asm-ia64/linux/cpu.h
 
 softlink include/linux/byteorder/generic.h include/asm-ia64/linux/byteorder/generic.h
 softlink include/linux/byteorder/little_endian.h include/asm-ia64/linux/byteorder/little_endian.h
index aac3bf8dd8cfe55695f1b5ae55f2bea4a8ee9a2c..290b3296ab51ac81b9f371857c4053e92f49f3e6 100644 (file)
@@ -27,7 +27,13 @@ unsigned int watchdog_on = 0;        // from arch/x86/nmi.c ?!?
 
 void unw_init(void) { printf("unw_init() skipped (NEED FOR KERNEL UNWIND)\n"); }
 void ia64_mca_init(void) { printf("ia64_mca_init() skipped (Machine check abort handling)\n"); }
-void hpsim_setup(char **x) { printf("hpsim_setup() skipped (MAY NEED FOR CONSOLE INPUT!!!)\n"); }      
+void ia64_mca_cpu_init(void *x) { }
+void ia64_patch_mckinley_e9(unsigned long a, unsigned long b) { }
+void ia64_patch_vtop(unsigned long a, unsigned long b) { }
+void hpsim_setup(char **x) { }
+
+// called from mem_init... don't think s/w I/O tlb is needed in Xen
+void swiotlb_init(void) { }
 
 long
 is_platform_hp_ski(void)
index a15b754d683f09c23ce5738a2682aae314d786fc..2c24a872eaf728bf2ca7a48b96110a6d3d118413 100644 (file)
 #include <xen/trace.h>
 #include <asm/meminit.h>
 #include <asm/page.h>
+#include <asm/setup.h>
 
 unsigned long xenheap_phys_end;
 
+char saved_command_line[COMMAND_LINE_SIZE];
+
 struct exec_domain *idle_task[NR_CPUS] = { &idle0_exec_domain };
 
 #ifdef CLONE_DOMAIN0
@@ -226,15 +229,15 @@ void start_kernel(void)
        (xenheap_phys_end-__pa(heap_start)) >> 20,
        (xenheap_phys_end-__pa(heap_start)) >> 10);
 
-    setup_arch();
+    late_setup_arch(&cmdline);
     setup_per_cpu_areas();
     mem_init();
 
 printk("About to call scheduler_init()\n");
     scheduler_init();
     local_irq_disable();
-printk("About to call time_init()\n");
-    time_init();
+printk("About to call xen_time_init()\n");
+    xen_time_init();
 printk("About to call ac_timer_init()\n");
     ac_timer_init();
 // init_xen_time(); ???
index c590f314238afef1661f2e2108859db7292800ed..74dbb3a4e5ec15ae555f729af59a47814703d686 100644 (file)
@@ -14,8 +14,6 @@
 // needed by include/asm-ia64/page.h
 #define        CONFIG_IA64_PAGE_SIZE_16KB      // 4KB doesn't work?!?
 #define        CONFIG_IA64_GRANULE_16MB
-// needed in arch/ia64/setup.c to reserve memory for domain0
-#define CONFIG_BLK_DEV_INITRD
 
 #ifndef __ASSEMBLY__
 
@@ -134,6 +132,7 @@ struct page;
 #undef ____cacheline_aligned
 #undef ____cacheline_aligned_in_smp
 #define __cacheline_aligned
+#define __cacheline_aligned_in_smp
 #define ____cacheline_aligned
 #define ____cacheline_aligned_in_smp
 #define ____cacheline_maxaligned_in_smp
@@ -237,6 +236,20 @@ void sort_main_extable(void);
 typedef s64 time_t;
 typedef s64 suseconds_t;
 
+// needed for include/linux/jiffies.h
+typedef long clock_t;
+
+// from include/linux/kernel.h, needed by jiffies.h
+#define typecheck(type,x) \
+({     type __dummy; \
+       typeof(x) __dummy2; \
+       (void)(&__dummy == &__dummy2); \
+       1; \
+})
+
+// from include/linux/timex.h, needed by arch/ia64/time.c
+#define        TIME_SOURCE_CPU 0
+
 // used in common code
 #define softirq_pending(cpu)   (cpu_data(cpu)->softirq_pending)
 
@@ -244,6 +257,13 @@ typedef s64 suseconds_t;
 #define        SA_SHIRQ        0x04000000
 #define        SA_INTERRUPT    0x20000000
 
+// needed for setup.c
+extern unsigned long loops_per_jiffy;
+extern char saved_command_line[];
+struct screen_info { };
+#define seq_printf(a,b...) printf(b)
+#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
+
 // these declarations got moved at some point, find a better place for them
 extern int opt_noht;
 extern int ht_per_core;